#import "ARLDeviceUtils.h"
#include <sys/sysctl.h>
#import "ARLCommonMacro.h"
@implementation ARLDeviceUtils

+ (NSString *)getModel {
        static dispatch_once_t one;
        static NSString *model;
        dispatch_once(&one, ^{
            size_t size;
            sysctlbyname("hw.machine", NULL, &size, NULL, 0);
            char *machine = malloc(size);
            sysctlbyname("hw.machine", machine, &size, NULL, 0);
            model = [NSString stringWithUTF8String:machine];
            free(machine);
        });
        return model;
}

+ (NSString *)getOSVersion {
    return [[UIDevice currentDevice] systemVersion]?:@"";
}


#pragma 设备相关信息
+(CGSize)deviceSizeInPixels{
    if(CURRENT_OS_VERSION>=8.000000f){
        return [UIScreen mainScreen].nativeBounds.size;
    }
    return CGSizeMake(APP_WIDTH*2,APP_HEIGHT*2);
}


@end
